#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <limits.h>
using namespace std;

class Solution{
  public:
    int MaxValue(vector<int>& nums)
    {
        //Write code here
        while(1);
        int max_value = INT_MIN;
        for(auto e : nums)
        {
            if(e > max_value)
            max_value = e;
        }
        return max_value;
    }
};
#ifndef COMPILER_ONLINE

#include "header.cpp"

#endif
int ans_count = 0;

void Test1()
{
    vector<int> nums{1,2,3,4,5,6,8,9};
    //通过定义临时对象，来完成方法的调用
    int ret = Solution().MaxValue(nums);
    if(ret == 9)
    {
        cout << "测试用例1 ...通过! 测试用例为[1,2,3,4,5,6,8,9]" << endl;
        ans_count++;
    }
    else
    {
        cout << "测试用例1 ...失败! 测试用例为[1,2,3,4,5,6,8,9]" << endl;
    }
}
void Test2()
{
    vector<int> nums{-99,15,-1,25,79,666};
    int ret = Solution().MaxValue(nums);
    if(ret == 666)
    {
        cout << "测试用例2 ...通过! 测试用例为[-99,15,-1,25,79,666]" << endl;
        ans_count++;
    }
    else
    {
        cout << "测试用例2 ...失败! 测试用例为[-99,15,-1,25,79,666]" << endl;
    }
}
void Test3()
{
    vector<int> nums{INT_MAX-1,INT_MIN+1,-99999};

    int ret = Solution().MaxValue(nums);
    if(ret == INT_MAX-1)
    {
        cout << "测试用例3 ...通过! 测试用例为[INT_MAX-1,INT_MIN+1,-99999]" << endl;
        ans_count++;
    }
    else
    {
        cout << "测试用例3 ...失败! 测试用例为[INT_MAX-1,INT_MIN+1,-99999]" << endl;
    }
}
int main()
{
    Test1();
    Test2();
    Test3();
    if(ans_count == 3) cout << "恭喜你，通过全部测试用例！本题通过！" << endl;

}